home *** CD-ROM | disk | FTP | other *** search
- // wraps8.psw: 8Bawl animations
- // Eric P. Scott, San Francisco State University, January 1994
-
- // dissolve down from startpt; return fraction (<=0 => we made it all the way)
- defineps disdown(float startpt, bsrcx, bsrcy, bwidth, bheight;
- userobject bgstate; float bdestx, bdesty, csrcx, csrcy, cwidth,
- cheight; userobject cgstate; float cdestx, cdesty|float *endpt)
- startpt 1500 mul cvi realtime add
- {
- bsrcx bsrcy bwidth bheight bgstate bdestx bdesty Sover composite
- csrcx csrcy cwidth cheight cgstate cdestx cdesty
- 7 index realtime sub 1500 div
- dup 0 le rightbuttondown or { exit } if
- dissolve
- flushgraphics
- yield
- } bind loop
- 9 1 roll pop pop pop pop pop pop pop pop
- endpt
- endps
-
- // dissolve up from startpt; return fraction (>=1 => we made it all the way)
- defineps disup(float startpt, bsrcx, bsrcy, bwidth, bheight;
- userobject bgstate; float bdestx, bdesty, csrcx, csrcy, cwidth,
- cheight; userobject cgstate; float cdestx, cdesty|float *endpt)
- buttondown
- startpt 1500 mul cvi realtime exch sub
- {
- bsrcx bsrcy bwidth bheight bgstate bdestx bdesty Sover composite
- csrcx csrcy cwidth cheight cgstate cdestx cdesty
- realtime 8 index sub 1500 div
- dup 1 ge rightbuttondown or { exit } if
- buttondown 10 index xor {
- 0 currentmouse Above 0 findwindow {
- 3 1 roll pop pop currentowner currentcontext eq { exit } if
- } { pop pop pop } ifelse
- } if
- dissolve
- flushgraphics
- yield
- } bind loop
- 10 1 roll pop pop pop pop pop pop pop pop pop
- endpt
- endps
-